home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / Snippets / Platforms & Tools / MacApp / Eenie 1.0b2PQR / UEenie.h < prev    next >
Encoding:
Text File  |  1991-09-23  |  3.8 KB  |  146 lines  |  [TEXT/MPS ]

  1. // UEenie.h -----------------------------------------------------------------
  2. // Copyright © 1991 by Apple Computer, Inc. All rights reserved.
  3.  
  4. #pragma once
  5.  
  6. // INCLUDE FILES --------------------------------------------------------------
  7.  
  8. #include "IncludeFiles.h"
  9.  
  10.  
  11. //FORWARD DECLARATIONS --------------------------------------------------------
  12.  
  13. class TEenieView;
  14. class TEenieView1; class TEenieView2; class TEenieView3; class TEenieView4;
  15.  
  16.  
  17. // GLOBALS --------------------------------------------------------------------
  18.  
  19. RGBColor gDKGray(18000, 22000, 25000);        // dark gray adorner color
  20. RGBColor gDKPink(0xF8FF, 0x2666, 0xFFFF);     // dark pink hilite color
  21.  
  22.  
  23. // CLASS DEFINITIONS-----------------------------------------------------------
  24.  
  25. // TApplication ---------------------------------------------------------------
  26.  
  27. class TAdornerApplication : public TApplication {
  28. public:
  29. //    METHODS
  30.     virtual pascal void         IAdornerApplication(OSType fileType, OSType creator);
  31.     virtual pascal TDocument*     DoMakeDocument(CommandNumber, TFile*);
  32. };
  33.  
  34.  
  35. // TDocuments -----------------------------------------------------------------
  36.  
  37. class TAdornerDocument : public TDocument {
  38. public:
  39. //    METHODS
  40.     virtual pascal void        IAdornerDocument();        // init Adorner doucument (if any)
  41.     virtual pascal void     DoMakeViews(Boolean /*forPrinting*/);
  42. };
  43.  
  44.  
  45. // TEenieView ----------------------------------------------------------------
  46.  
  47. class TEenieView  : public TView{
  48. public:
  49. //     TYPEDEFS AND ENUMS
  50.     enum   eViewChange {eVIEW1=700, eVIEW2, eVIEW3, eVIEW4};
  51.     
  52. //    METHODS
  53.     virtual pascal void        Initialize();
  54.     virtual pascal void        DoPostCreate(TDocument* itsDocument);
  55.     virtual pascal void     Hilite();
  56.     
  57. //    FIELDS
  58.     long                    fCounter;
  59. };
  60.  
  61.  
  62. class TEenieView1 : public TEenieView {
  63. public:
  64. //    METHODS
  65.     virtual pascal void        Draw(const VRect& area);
  66.     virtual pascal void     DrawNumber();
  67.     virtual pascal void        DoMouseCommand(    VPoint& theMouse,
  68.                                               TToolboxEvent* event,
  69.                                               Point hysteresis);
  70.     virtual pascal void     DoUpdate(    ChangeID theID,
  71.                                         TObject* changedObject,
  72.                                         TObject* changedBy);
  73. };
  74.  
  75.  
  76. class TEenieView2 : public TEenieView {
  77. public:
  78. //    METHODS
  79.     virtual pascal void        Draw(const VRect& area);
  80.     virtual pascal void     DrawNumber();
  81.     virtual pascal void        DoMouseCommand(    VPoint& theMouse,
  82.                                               TToolboxEvent* event,
  83.                                               Point hysteresis);
  84.     virtual pascal void     DoUpdate(    ChangeID theID,
  85.                                         TObject* changedObject,
  86.                                         TObject* changedBy);
  87. };
  88.  
  89.  
  90. class TEenieView3 : public TEenieView {
  91. public:
  92. //    METHODS
  93.     virtual pascal void        Draw(const VRect& area);
  94.     virtual pascal void     DrawNumber();
  95.     virtual pascal void        DoMouseCommand(    VPoint& theMouse,
  96.                                               TToolboxEvent* event,
  97.                                               Point hysteresis);
  98.     virtual pascal void     DoUpdate(    ChangeID theID,
  99.                                         TObject* changedObject,
  100.                                         TObject* changedBy);
  101. };
  102.  
  103.  
  104. class TEenieView4 : public TEenieView {
  105. public:
  106. //    METHODS
  107.     virtual pascal void        Draw(const VRect& area);
  108.     virtual pascal void     DrawNumber();
  109.     virtual pascal void        DoMouseCommand(    VPoint& theMouse,
  110.                                               TToolboxEvent* event,
  111.                                               Point hysteresis);
  112.     virtual pascal void     DoUpdate(    ChangeID theID,
  113.                                         TObject* changedObject,
  114.                                         TObject* changedBy);
  115. };
  116.  
  117.  
  118. // ADORNERS ------------------------------------------------------------------
  119.  
  120. class TGrayFill : public TAdorner {
  121. public:
  122. //    METHODS
  123.     virtual pascal void Draw(TView*    itsView, const VRect& /*area*/); 
  124. };
  125.  
  126.  
  127. class TOtherGrayFill : public TAdorner {
  128. public:
  129. //    METHODS
  130.     virtual pascal void Draw(TView*    itsView, const VRect& /*area*/); 
  131. };
  132.  
  133.  
  134. class TEtchedFrame : public TAdorner {
  135. public:
  136. //    METHODS
  137.     virtual pascal void Initialize();    
  138.     virtual pascal void Draw(TView*    itsView, const VRect& /*area*/);
  139.  
  140. //    FIELDS
  141.     Point                 fInset;
  142. };
  143.  
  144. // THE END -------------------------------------------------------------------
  145.  
  146.